cmake_minimum_required(VERSION 3.6)
project(libusb_1_0_20)

set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")

set(SOURCE_FILES
    android/config.h
    examples/getopt/getopt.c
    examples/getopt/getopt.h
    examples/getopt/getopt1.c
    examples/dpfp.c
    examples/dpfp_threaded.c
    examples/ezusb.c
    examples/ezusb.h
    examples/fxload.c
    examples/hotplugtest.c
    examples/listdevs.c
    examples/sam3u_benchmark.c
    examples/xusb.c
    libusb/os/haiku/haiku_pollfs.cpp
    libusb/os/haiku/haiku_usb.h
    libusb/os/haiku/haiku_usb_backend.cpp
    libusb/os/haiku/haiku_usb_raw.cpp
    libusb/os/haiku/haiku_usb_raw.h
    libusb/os/darwin_usb.c
    libusb/os/darwin_usb.h
    libusb/os/linux_netlink.c
    libusb/os/linux_udev.c
    libusb/os/linux_usbfs.c
    libusb/os/linux_usbfs.h
    libusb/os/netbsd_usb.c
    libusb/os/openbsd_usb.c
    libusb/os/poll_posix.c
    libusb/os/poll_posix.h
    libusb/os/poll_windows.c
    libusb/os/poll_windows.h
    libusb/os/threads_posix.c
    libusb/os/threads_posix.h
    libusb/os/threads_windows.c
    libusb/os/threads_windows.h
    libusb/os/wince_usb.c
    libusb/os/wince_usb.h
    libusb/os/windows_common.h
    libusb/os/windows_usb.c
    libusb/os/windows_usb.h
    libusb/core.c
    libusb/descriptor.c
    libusb/hotplug.c
    libusb/hotplug.h
    libusb/io.c
    libusb/libusb.h
    libusb/libusbi.h
    libusb/strerror.c
    libusb/sync.c
    libusb/version.h
    libusb/version_nano.h
    msvc/config.h
    msvc/errno.h
    msvc/inttypes.h
    msvc/missing.c
    msvc/missing.h
    msvc/stdint.h
    tests/libusb_testlib.h
    tests/stress.c
    tests/testlib.c
    Xcode/config.h tests/test_statfs.cpp examples/hotplug_new.cpp)

add_executable(libusb_1_0_20 ${SOURCE_FILES})